/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utility;

import java.util.Locale;
import java.util.ResourceBundle;
import javax.faces.context.FacesContext;

/**
 *
 * @author Carmela
 */
public class ResourceBundleLoader {
    public static ResourceBundle getResourceBundle(FacesContext context){
        ClassLoader cl=Thread.currentThread().getContextClassLoader();
        Locale l=context.getViewRoot().getLocale();
        return ResourceBundle.getBundle("bundle.messaggi_"+l, l, cl);
    }
}
